'use strict';

define(['services'], function (services) {
    services.system.register('SchedulerService', ['$resource', function ($resource) {
        return $resource('/rest/system/scheduler/:id', {id: '@id'}, {
            query: {
                isArray: false
            },
            sync: {
                url: '/rest/system/scheduler/sync',
                method: 'POST',
                isArray: false
            },
            stop: {
                url: '/rest/system/scheduler/:id/stop',
                method: 'POST',
                params: {id: '@id'},
                isArray: false
            },
            start: {
                url: '/rest/system/scheduler/:id/start',
                method: 'POST',
                params: {id: '@id'},
                isArray: false
            },
            run: {
                url: '/rest/system/scheduler/:id/run',
                method: 'POST',
                params: {id: '@id'},
                isArray: false
            }
        });
    }]);
});